package io.netty.shenh.example.inboundoutbound;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class MyServerHandler extends SimpleChannelInboundHandler<Long> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, Long msg) throws Exception {
//        System.out.println("MyServerHandler-channelRead0");
        System.out.println("从客户端" + ctx.channel().remoteAddress() + "读取到: " + msg);
        ctx.writeAndFlush(98765L);
    }
}
